package com.miplus.ccrm.core.service.aiqm;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.miplus.ccrm.core.pojo.TRecorder;
import com.miplus.ccrm.core.mapper.TRecorderMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author pc
* @description 针对表【T_RECORDER(录音明细表)】的数据库操作Service实现
* @createDate 2024-11-04 12:59:23
*/
@Service
public class TRecorderServiceImpl extends MPJBaseServiceImpl<TRecorderMapper, TRecorder>
    implements TRecorderService{

    @Override
    public String getRecordIPAddr(String callid)
    {
        List<TRecorder> recList=selectJoinList(TRecorder.class,new MPJLambdaWrapper<TRecorder>()
                .eq(TRecorder::getCallid,callid)
                .orderByDesc(TRecorder::getRecorderid)
        );
        if(recList==null){
            return "-1";
        }
        return recList.get(0).getFilepath()+recList.get(0).getFilename();
    }
}




